Accurate Extraction of Bug Fix Pattern Occurrences using Abstract Syntax Tree Analysis
نویسندگان
چکیده
This manuscript presents an approach for studying the abundance of bug fix patterns. Bug fix patterns capture the knowledge on how to fix bugs, they are essential building blocks for research areas such as bug fix recommendation and automatic repair. In this paper, we focus on the problem of the accurate measurement of bug fix pattern abundance: how to reliably tell that one pattern is more common than another one? We propose an approach to formalizing bug fix patterns and an accurate instance pattern identification process that uses this formalization. Our technique is based on a tree differencing algorithm working with abstract syntax trees (AST). A comparative evaluation shows that our approach improves the accuracy of pattern instance identification by an order of magnitude.
منابع مشابه
Design Pattern Refactoring by Pretty-Printing
Most design patterns in the Gang-of-Four text can be written as a refactoring script – a programmatic sequence of refactorings.R is a new Java refactoring engine based on prettyprinting. It builds a main-memory, non-persistent database to encode containment relationships among Java entity declarations (e.g., packages, classes, methods), language features such as inheritance and modifiers, and p...
متن کاملA deep tree-based model for software defect prediction
Defects are common in software systems and can potentially cause various problems to software users. Different methods have been developed to quickly predict the most likely locations of defects in large code bases. Most of them focus on designing features (e.g. complexity metrics) that correlate with potentially defective code. Those approaches however do not sufficiently capture the syntax an...
متن کاملExploiting Abstract Syntax Trees to Locate Software Defects
Context. Software defect prediction aims to reduce the large costs involved with faults in a software system. A wide range of traditional software metrics have been evaluated as potential defect indicators. These traditional metrics are derived from the source code or from the software development process. Studies have shown that no metric clearly out performs another and identifying defect-pro...
متن کاملTarget Code Selection by Tilling AST with the Use of Tree Pattern Pushdown Automaton
A new and simple method for target code selection by tilling an abstract syntax tree is presented. As it is usual, tree patterns corresponding to target machine instructions are matched in the abstract syntax tree. Matching tree patterns is performed with the use of tree pattern pushdown automaton, which accepts all tree patterns matching the abstract syntax tree in the linear postfix bar notat...
متن کاملASTLOG: A Language for Examining Abstract Syntax Trees
We desired a facility for locating/analyzing syntactic artifacts in abstract syntax trees of C/C++ programs, similar to the facility grep or awk provides for locating artifacts at the lexical level. Prolog, with its implicit pattern-matching and backtracking capabilities, is a natural choice for such an application. We have developed a Prolog variant that avoids the overhead of translating the ...
متن کامل